// Learn more about Tauri commands at https://tauri.app/develop/calling-rust/

mod command;

use command::*;

#[cfg_attr(mobile, tauri::mobile_entry_point)]
pub fn run() {
    tauri::Builder::default()
        .plugin(tauri_plugin_http::init())
        .plugin(tauri_plugin_os::init())
        .plugin(tauri_plugin_dialog::init())
        .plugin(tauri_plugin_fs::init())
        .plugin(tauri_plugin_opener::init())
        .plugin(tauri_plugin_sqlite::init())
        .plugin(tauri_plugin_udp::init())
        .plugin(tauri_plugin_tcp::init())
        .plugin(tauri_plugin_serial::init())
        .invoke_handler(tauri::generate_handler![
            read_file,
            write_file,
            delete_file,
            get_ip
        ])
        .run(tauri::generate_context!())
        .expect("error while running tauri application");
}
